/**
* @author:kellen
* @contact:xiekellen@hotmail.com
* @company:achivo-gz
* @created on:
* @modified on:
*/

package com.sasis.service.impl;

import java.util.List;

import com.sasis.service.impl.BaseManager;
import com.sasis.model.FoodType;
import com.sasis.dao.FoodTypeDao;
import com.sasis.service.FoodTypeManager;

import com.sasis.util.PageList;
import com.sasis.util.PageRequest;

public class FoodTypeManagerImpl extends BaseManager implements FoodTypeManager {
    private FoodTypeDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setFoodTypeDao(FoodTypeDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.sasis.service.FoodTypeManager#getFoodTypes(com.sasis.model.FoodType)
     */
    public List getFoodTypes(final FoodType foodType) {
        return dao.getFoodTypes(foodType);
    }

    /**
     * @see com.sasis.service.FoodTypeManager#getFoodType(String id)
     */
    public FoodType getFoodType(final String id) {
        return dao.getFoodType(new Integer(id));
    }

    /**
     * @see com.sasis.service.FoodTypeManager#saveFoodType(FoodType foodType)
     */
    public void saveFoodType(FoodType foodType) {
        dao.saveFoodType(foodType);
    }

    /**
     * @see com.sasis.service.FoodTypeManager#removeFoodType(String id)
     */
    public void removeFoodType(FoodType foodType) {
        dao.removeFoodType( foodType);
    }
    public PageList queryForPageList(String listStatementId,  
    		Object parameterObject, PageRequest pageRequest){
	return dao.queryForPageList(listStatementId,   parameterObject, pageRequest);
    }
}
